package bb.lanxing.calc.processer;

import android.util.Log;

import bb.lanxing.calc.processer.i.IWorkoutProcessor;

public class ProcessorFactory {
    final static private String TAG = "ProcessorFactory";

    public static final int TYPE_SIMPLE = 1;
    public static final int TYPE_RECORD = 2;
    public static final int TYPE_STATIC = 3;
    public static final int TYPE_SIMULATOR = 4;
    public static final int TYPE_BICI_SIMPLE = 11;

    public static IWorkoutProcessor create(int vType) {
        Log.d(TAG, "IWorkoutProcessor vType=" + vType);
        if (vType == TYPE_RECORD) {
            return new RecordWorkoutProcessor();
        } else if (vType == TYPE_STATIC) {
            return new StaticWorkoutProcessor();
        } else if (vType == TYPE_SIMULATOR) {
            return new SimulatorWorkoutProcessor();
        } else if (vType == TYPE_BICI_SIMPLE) {
            //not use BiCi
            return new BiCiSimpleWorkoutProcessor();
        } else {
            return new SimpleWorkoutProcessor();
        }
    }
}